<?php

use think\migration\Seeder;

class BasicPollutantTypeData extends Seeder
{
    public function run()
    {
        $table = $this->table('basic_pollutant_type');
        //说明：贡献度只有这三种
        $rows = [
            [
                'id'          => '1',
                'name'        => 'PM2.5',
                'is_source'   => '1',
                'is_control'  => '1',
                'description' => 'PM2.5'
            ],
            [
                'id'          => '2',
                'name'        => 'PM10',
                'is_source'   => '0',
                'is_control'  => '1',
                'description' => 'PM10'
            ],
            [
                'id'          => '3',
                'name'        => 'SO2',
                'is_source'   => '1',
                'is_control'  => '1',
                'description' => '二氧化硫'
            ],
            [
                'id'          => '4',
                'name'        => 'NO2',
                'is_source'   => '1',
                'is_control'  => '1',
                'description' => '氮氧化物'
            ],
            [
                'id'          => '5',
                'name'        => 'O3',
                'is_source'   => '0',
                'is_control'  => '1',
                'description' => '臭氧'
            ],
            [
                'id'          => '6',
                'name'        => 'CO',
                'is_source'   => '0',
                'is_control'  => '0',
                'description' => '一氧化碳'
            ],
        ];
        $table->insert($rows)->save();
    }
}